<?php
//图片上传.这是可行的
$file = 'H:/test/shop/img/admin/login-bg.jpg'; //要上传的文件
$update_url = 'http://api.zuosa.com/statuses/update.json';
$url  = $update_url;

$fields['pic'] = '@'.$file;
$fields['status'] ="图片上传".time();
$ch = curl_init();

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch,CURLOPT_USERPWD, 'falconchen:7340985');

curl_setopt($ch, CURLOPT_URL, $url );
curl_setopt($ch, CURLOPT_POST, 1 );
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields );

$data = curl_exec( $ch );

if ($error = curl_error($ch) ) {
       die($error);
}
curl_close($ch);
var_dump( json_decode($data,TRUE));